(#) com.vanniktech:lint-rules-android

Name
:   Lint Rules Android
Description
:   Very opinionated Lint Checks
Project
:   https://github.com/vanniktech/lint-rules
License
:   [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt)
Vendor
:   vanniktech/lint-rules/
Feedback
:   https://github.com/vanniktech/lint-rules/issues
Min
:   Lint 8.0 and 8.1
Compiled
:   Lint 8.0 and 8.1
Artifact
:   com.vanniktech:lint-rules-android:0.25.0

(##) Included Issues

|Issue Id                                                                            |Issue Description                                                                     |
|------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------|
|[AlertDialogUsage](AlertDialogUsage.md.html)                                        |Use the support library AlertDialog instead of android.app.AlertDialog                |
|[AssertjImport](AssertjImport.md.html)                                              |Flags Java 6 incompatible imports                                                     |
|[ColorCasing](ColorCasing.md.html)                                                  |Raw colors should be defined with uppercase letters                                   |
|[ConstraintLayoutToolsEditorAttribute](ConstraintLayoutToolsEditorAttribute.md.html)|Flags tools:layout_editor xml properties                                              |
|[DefaultLayoutAttribute](DefaultLayoutAttribute.md.html)                            |Flags default layout values                                                           |
|[ErroneousLayoutAttribute](ErroneousLayoutAttribute.md.html)                        |Layout attribute that's not applicable to a particular view                           |
|[FormalGerman](FormalGerman.md.html)                                                |Marks strings which contain formal German words                                       |
|[ImplicitStringPlaceholder](ImplicitStringPlaceholder.md.html)                      |Marks implicit placeholders in strings without an index                               |
|[InvalidAccessibility](InvalidAccessibility.md.html)                                |Marks invalid accessibility usages                                                    |
|[InvalidImport](InvalidImport.md.html)                                              |Flags invalid imports                                                                 |
|[InvalidSingleLineComment](InvalidSingleLineComment.md.html)                        |Marks single line comments that are not sentences                                     |
|[InvalidString](InvalidString.md.html)                                              |Marks invalid translation strings                                                     |
|[JCenter](JCenter.md.html)                                                          |Marks usage of the jcenter() repository                                               |
|[LayoutFileNameMatchesClass](LayoutFileNameMatchesClass.md.html)                    |Checks that the layout file matches the class name                                    |
|[MatchingMenuId](MatchingMenuId.md.html)                                            |Flags menu ids that don't match with the file name                                    |
|[MatchingViewId](MatchingViewId.md.html)                                            |Flags view ids that don't match with the file name                                    |
|[MissingScrollbars](MissingScrollbars.md.html)                                      |Scroll views should declare a scrollbar                                               |
|[MissingXmlHeader](MissingXmlHeader.md.html)                                        |Flags xml files that don't have a header                                              |
|[NamingPattern](NamingPattern.md.html)                                              |Names should be well named                                                            |
|[RawColor](RawColor.md.html)                                                        |Flags color that are not defined as resource                                          |
|[RawDimen](RawDimen.md.html)                                                        |Flags dimensions that are not defined as resource                                     |
|[ResourcesGetColorCall](ResourcesGetColorCall.md.html)                              |Marks usage of deprecated getColor() on Resources                                     |
|[ResourcesGetColorStateListCall](ResourcesGetColorStateListCall.md.html)            |Marks usage of deprecated getColorStateList() on Resources                            |
|[ResourcesGetDrawableCall](ResourcesGetDrawableCall.md.html)                        |Marks usage of deprecated getDrawable() on Resources                                  |
|[ShouldUseStaticImport](ShouldUseStaticImport.md.html)                              |Flags declarations that should be statically imported                                 |
|[StringNotCapitalized](StringNotCapitalized.md.html)                                |Marks strings which are not capitalized                                               |
|[SuperfluousMarginDeclaration](SuperfluousMarginDeclaration.md.html)                |Flags margin declarations that can be simplified                                      |
|[SuperfluousNameSpace](SuperfluousNameSpace.md.html)                                |Flags namespaces that are already declared                                            |
|[SuperfluousPaddingDeclaration](SuperfluousPaddingDeclaration.md.html)              |Flags padding declarations that can be simplified                                     |
|[Todo](Todo.md.html)                                                                |Marks todos in any given file                                                         |
|[UnsupportedLayoutAttribute](UnsupportedLayoutAttribute.md.html)                    |Marks layout attributes which are not supported                                       |
|[UnusedMergeAttributes](UnusedMergeAttributes.md.html)                              |Flags android and app attributes that are used on a <merge> attribute for custom Views|
|[WrongAnnotationOrder](WrongAnnotationOrder.md.html)                                |Checks that Annotations comply with a certain order                                   |
|[WrongConstraintLayoutUsage](WrongConstraintLayoutUsage.md.html)                    |Marks a wrong usage of the Constraint Layout                                          |
|[WrongDrawableName](WrongDrawableName.md.html)                                      |Drawable names should be prefixed accordingly                                         |
|[WrongGlobalIconColor](WrongGlobalIconColor.md.html)                                |Each icon should have the same global color defined                                   |
|[WrongLayoutName](WrongLayoutName.md.html)                                          |Layout names should be prefixed accordingly                                           |
|[WrongMenuIdFormat](WrongMenuIdFormat.md.html)                                      |Flag menu ids that are not in lowerCamelCase Format                                   |
|[WrongTestMethodName](WrongTestMethodName.md.html)                                  |Flags test methods that start with test                                               |
|[WrongViewIdFormat](WrongViewIdFormat.md.html)                                      |Flag view ids that are not in lowerCamelCase Format                                   |
|[XmlSpacing](XmlSpacing.md.html)                                                    |XML files should not contain any new lines                                            |

(##) Including

!!!
   This is not a built-in check. To include it, add the below dependency
   to your project. This lint check is included in the lint documentation,
   but the Android team may or may not agree with its recommendations.

```
// build.gradle.kts
lintChecks("com.vanniktech:lint-rules-android:0.25.0")

// build.gradle
lintChecks 'com.vanniktech:lint-rules-android:0.25.0'

// build.gradle.kts with version catalogs:
lintChecks(libs.lint.rules.android)

# libs.versions.toml
[versions]
lint-rules-android = "0.25.0"
[libraries]
# For clarity and text wrapping purposes the following declaration is
# shown split up across lines, but in TOML it needs to be on a single
# line (see https://github.com/toml-lang/toml/issues/516) so adjust
# when pasting into libs.versions.toml:
lint-rules-android = {
    module = "com.vanniktech:lint-rules-android",
    version.ref = "lint-rules-android"
}
```

0.25.0 is the version this documentation was generated from;
there may be newer versions available.

(##) Changes

* 0.6.0: First version includes ConstraintLayoutToolsEditorAttribute,
  DefaultLayoutAttribute, InvalidImport, InvalidSingleLineComment,
  InvalidString, MatchingMenuId, MatchingViewId, MissingXmlHeader,
  NamingPattern, RawColor, RawDimen, ResourcesGetColorCall,
  ResourcesGetColorStateListCall, ResourcesGetDrawableCall,
  ShouldUseStaticImport, SuperfluousMarginDeclaration,
  SuperfluousNameSpace, SuperfluousPaddingDeclaration,
  UnsupportedLayoutAttribute, WrongAnnotationOrder,
  WrongConstraintLayoutUsage, WrongLayoutName, WrongMenuIdFormat,
  WrongTestMethodName, WrongViewIdFormat, XmlSpacing.
* 0.7.1: Adds LayoutFileNameMatchesClass, Todo, UnusedMergeAttributes.
* 0.8.0: Adds AssertjImport, ColorCasing, IgnoreWithoutReason, JCenter.
* 0.9.0: Adds AlertDialogUsage.
* 0.10.0: Removes IgnoreWithoutReason.
* 0.24.0: Adds ErroneousLayoutAttribute, FormalGerman,
  ImplicitStringPlaceholder, InvalidAccessibility, MissingScrollbars,
  StringNotCapitalized, WrongDrawableName, WrongGlobalIconColor.

(##) Version Compatibility

There are multiple older versions available of this library:

| Version            | Date     | Issues | Compatible | Compiled      | Requires |
|-------------------:|----------|-------:|------------|--------------:|---------:|
|              0.25.0|2023/09/17|      41|         Yes|    8.0 and 8.1|8.0 and 8.1|
|              0.24.0|2023/02/21|      41|         Yes|    7.3 and 7.4|7.3 and 7.4|
|              0.13.0|2020/03/22|      33|      No[^1]|            3.6|       3.6|
|              0.12.0|2019/04/29|      33|      No[^1]|            3.4|       3.4|
|              0.10.0|2019/02/19|      33|      No[^1]|            3.3|       3.3|
|               0.9.0|2019/01/18|      34|      No[^1]|            3.3|       3.3|
|               0.8.0|2018/09/25|      33|      No[^1]|            3.2|       3.2|
|               0.7.1|2018/04/16|      29|      No[^2]|            3.1|       3.1|
|               0.6.0|2018/02/04|      26|      No[^3]|  Not specified|Not specified|

Compatibility Problems:

[^1]: com.android.SdkConstants#CLASS_CONSTRAINT_LAYOUT is not available  
[^2]: com.android.tools.lint.detector.api.Project#getGradleProjectModel(): com.android.builder.model.AndroidProject is not available  
[^3]: com.android.tools.lint.detector.api.LayoutDetector#fix(): com.android.tools.lint.detector.api.LintFix$Builder is not available  

<!-- Markdeep: --><style class="fallback">body{visibility:hidden;white-space:pre;font-family:monospace}</style><script src="markdeep.min.js" charset="utf-8"></script><script src="https://morgan3d.github.io/markdeep/latest/markdeep.min.js" charset="utf-8"></script><script>window.alreadyProcessedMarkdeep||(document.body.style.visibility="visible")</script>